package cn.bonoon.core;

import java.util.List;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletResponse;

import org.batatasframework.common.ParameterReader;
import org.batatasframework.immadiate.ImmadiatePlanDefinition;
import org.batatasframework.immadiate.ImmediateTaskHandler;
import org.batatasframework.immadiate.ImmediateTaskInfo;
import org.springframework.ui.Model;

import cn.bonoon.entities.ImmediateTaskEntity;
import cn.bonoon.kernel.support.IOperator;

public interface ImmediateTaskService {

	 ImmediateTaskInfo myTask(IOperator user, String catalog, List<ImmediateTaskInfo> tasks);

	 ImmediateTaskHandler<? extends ImmediateTaskEntity> findTaskHandler(String catalog, String key);
	
	 ImmadiatePlanDefinition findDefinition(String catalog, String key);

	 void deleteMaterial(String catalog, String key, IOperator user, Long taskid, Long id) ;

	 void update(String catalog, String key, IOperator user, ParameterReader parameter) throws Exception ;

	 void accepted(IOperator operator, ImmediateTaskEntity task) ;
	 ImmediateTaskEntity loadToShow(ImmadiatePlanDefinition def, IOperator user, ParameterReader parameter, Model model) ;

	void export(IOperator user, String catalog, String key, ParameterReader parameter, HttpServletResponse response, ServletContext servletContext);
}
